package action_行为型.interpreter_pattern_解释器模式;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: hihi
 * @Date: 2020/07/08/11:13
 * @Description:
 */
public class TerMinalExpression implements Expression {

	private String data;

	public TerMinalExpression(String data) {
		this.data = data;
	}

	/**
	 * 说明
	 *
	 * @param context
	 * @return
	 */
	@Override public boolean interpret(String context) {
		return context.contains(data);
	}
}
